$(function(){
    // 轮播图
    var swiper = new Swiper(".mySwiper", {
        slidesPerView: 3,
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
        
        loop : true,
        // loopAdditionalSlides : 0,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
           },
      });
    //   轮播图定时器
     var timer = setInterval(function(){
          $('.swiper-button-next').click()
      },2000)
      $('.banner_box').hover(function(){
          clearInterval(timer)
      },function(){
       timer = setInterval(function(){
            $('.swiper-button-next').click()
        },2000)
      }
      )
    //   热门速递tab栏切换
    $('.hot_rec').on('click','.tab',function(){
        $(this).addClass('active').siblings().removeClass('active')
        var index = $(this).index()
       $('.tabs').eq(index-1).show().siblings().hide()
    })
})